package cn.edu.scau.cmi.liujiaming.chapter04;

public class Example4_5 {
	public static void main(String args[]) {
		for(char c='A';c<='Z';c++) {
			switch(c) {
			case 'B':
			case 'F':
			case 'M':
			case 'Q':
			case 'T':
			case 'W':continue;
			}
			System.out.print(c+" ");
		}
		System.out.println("");
		long sum=0,i=1,max=2012;
		while(true) {
			sum+=i;
			if(sum>max) {
				break;
			}
			i++;
		}
		System.out.println("满足1+2+...+n<="+max+"的最大整数n为"+(i-2));
	}

}
